// Copyright (C) Kumo inc. and its affiliates.
// Author: Jeff.li lijippy@163.com
// All rights reserved.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.
//
#pragma once

#include <kmsql/sql/grammar/statements.h>

namespace kmsql {
    // Prints a summary of the given SQLStatement.
    void printStatementInfo(const SQLStatement *stmt);

    // Prints a summary of the given SelectStatement with the given indentation.
    void printSelectStatementInfo(const SelectStatement *stmt, uintmax_t num_indent);

    // Prints a summary of the given ImportStatement with the given indentation.
    void printImportStatementInfo(const ImportStatement *stmt, uintmax_t num_indent);

    // Prints a summary of the given CopyStatement with the given indentation.
    void printExportStatementInfo(const ExportStatement *stmt, uintmax_t num_indent);

    // Prints a summary of the given InsertStatement with the given indentation.
    void printInsertStatementInfo(const InsertStatement *stmt, uintmax_t num_indent);

    // Prints a summary of the given CreateStatement with the given indentation.
    void printCreateStatementInfo(const CreateStatement *stmt, uintmax_t num_indent);

    // Prints a summary of the given TransactionStatement with the given indentation.
    void printTransactionStatementInfo(const TransactionStatement *stmt, uintmax_t num_indent);

    // Prints a summary of the given Expression with the given indentation.
    void printExpression(Expr *expr, uintmax_t num_indent);

    // Prints an ORDER BY clause
    void printOrderBy(const std::vector<OrderDescription *> *expr, uintmax_t num_indent);

    // Prints WindowDescription.
    void printWindowDescription(WindowDescription *window_description, uintmax_t num_indent);
} // namespace kmsql
